local jingguo = fk.CreateSkill {
  name = "lingling__jingguo",
}

Fk:loadTranslationTable{
  ["lingling__jingguo"] = "经国",
  [":lingling__jingguo"] = "出牌阶段限一次，你可以弃置两张牌，本局你摸牌阶段摸牌数和手牌上限各+1（至多+3）。",

  ["#lingling__jingguo"] = "经国：弃两张牌，本局游戏摸牌阶段摸牌数和手牌上限各+1",
}

jingguo:addEffect("active", {
  anim_type = "offensive",
  prompt = "#lingling__jingguo",
  card_num = 2,
  target_num = 0,
  can_use = function (self, player)
    return player:usedSkillTimes(jingguo.name, Player.HistoryPhase) == 0 and
      player:getMark(jingguo.name) < 3
  end,
  card_filter = function (self, player, to_select, selected)
    return #selected < 2 and not player:prohibitDiscard(to_select)
  end,
  on_use = function(self, room, effect)
    local player = effect.from
    room:addPlayerMark(player, jingguo.name, 1)
    room:addPlayerMark(player, MarkEnum.AddMaxCards, 1)
    room:throwCard(effect.cards, jingguo.name, player, player)
  end,
})

jingguo:addEffect(fk.DrawNCards, {
  can_refresh = function (self, event, target, player, data)
    return target == player and player:getMark(jingguo.name) > 0
  end,
  on_refresh = function (self, event, target, player, data)
    data.n = data.n + player:getMark(jingguo.name)
  end,
})

return jingguo
